package top.wshape1.shiziapi.project.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import top.wshape1.shiziapi.common.domain.vo.PageVo;
import top.wshape1.shiziapi.common.utils.R;

import java.util.Collection;

/**
 * @author Wshape1
 * @version 1.0
 * @description
 * @since 2023-09-16
 */

@FeignClient("shiziapi-uaa")
public interface UaaFeignService {

    @PostMapping("/user/memberPage")
    R<PageVo> getMemberPage(@RequestParam(value = "page", required = false, defaultValue = "1") Long page,
                            @RequestParam(value = "limit", required = false, defaultValue = "6") Long limit,
                            @RequestBody Collection<Long> userIds);

    @GetMapping("/user/name")
    R<String> getUserNameById(@RequestParam("id") Long id);

}
